package com.jgp.attachment.props;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * 项目   parent
 * 作者   loufei
 * 时间   2018/4/27
 */
@Component
@ConfigurationProperties("jgp.attachment")
public class AttachmentConfigPropBean {
    private Boolean md5Check = false;
    private Boolean localEnable = true;
    private String localDir;
    private String localTempDir;
    private Boolean ftpEnable = false;
    private String ftpServer;
    private String ftpPort;
    private Map<String,List<String>> thumb;
    private Map<String, Allow> allow;
    
    public Boolean getMd5Check() {
        return md5Check;
    }
    
    public void setMd5Check(Boolean md5Check) {
        this.md5Check = md5Check;
    }
    
    public Boolean getLocalEnable() {
        return localEnable;
    }
    
    public void setLocalEnable(Boolean localEnable) {
        this.localEnable = localEnable;
    }
    
    public String getLocalDir() {
        return localDir;
    }
    
    public void setLocalDir(String localDir) {
        this.localDir = localDir;
    }
    
    public String getLocalTempDir() {
        return localTempDir;
    }
    
    public void setLocalTempDir(String localTempDir) {
        this.localTempDir = localTempDir;
    }
    
    public Boolean getFtpEnable() {
        return ftpEnable;
    }
    
    public void setFtpEnable(Boolean ftpEnable) {
        this.ftpEnable = ftpEnable;
    }
    
    public String getFtpServer() {
        return ftpServer;
    }
    
    public void setFtpServer(String ftpServer) {
        this.ftpServer = ftpServer;
    }
    
    public String getFtpPort() {
        return ftpPort;
    }
    
    public void setFtpPort(String ftpPort) {
        this.ftpPort = ftpPort;
    }
    
    
    public Map<String, List<String>> getThumb() {
        return thumb;
    }
    
    public void setThumb(Map<String, List<String>> thumb) {
        this.thumb = thumb;
    }
    
    
    public Map<String, Allow> getAllow() {
        return allow;
    }
    
    public void setAllow(Map<String, Allow> allow) {
        this.allow = allow;
    }
    
    public static class Allow {
        private String title;
        private List<String> extensions;
        
        public Allow() {
        }
        
        public String getTitle() {
            return title;
        }
        
        public void setTitle(String title) {
            this.title = title;
        }
        
        public List<String> getExtensions() {
            return extensions;
        }
        
        public void setExtensions(List<String> extensions) {
            this.extensions = extensions;
        }
    }
}
